import React from 'react'
import style from "./moduleTab.module.css";
interface Item {
    size: string,
    px: string
}
interface ModuleTabProps {
    tabitem1: Item[];
    // eventparent: any
}

// function ModuleTab1({ tabitem1, eventparent }: ModuleTabProps,) {
function ModuleTab1({ tabitem1 }: ModuleTabProps,) {
    // const {tabitem1} = props   //别的写法
    // const handleto = () => {
    //     eventparent('这是信息')
    // }
    return (
        <div className={style.tab}>
            {
                tabitem1.map((item: Item, index: number) => {
                    return <div className={style.tabone} key={index}>
                        <div style={{fontWeight:"bolder"}}>{item.size}</div>
                        {/* <div className={style.number} onClick={handleto}>{item.px}</div> */}
                        <div className={style.number}>{item.px}</div>
                    </div>
                })
            }
        </div>
    )
}

export default ModuleTab1
